import Vue from 'vue'
import Router from 'vue-router'
// import index from '@/components/index'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: resolve => require(['@/components/home'],resolve),
      children:[
      	{
      		path:'/index',
          name: 'index',
          component: resolve => require(['@/components/index'],resolve)
      	},
      	{
      		path:'/citys',
          name: 'citys',
          component: resolve => require(['@/components/citys'],resolve)
      	},
      	{
      		path:'/design',
          name: 'design',
          component: resolve => require(['@/components/design'],resolve)
      	},
      	{
      		path:'/designDetail',
          name: 'designDetail',
          component: resolve => require(['@/components/designDetail'],resolve)
      	},
      	{
      		path:'/company',
          name: 'company',
          component: resolve => require(['@/components/company'],resolve)
      	},
      	{
      		path:'/companyDetail',
          name: 'companyDetail',
          component: resolve => require(['@/components/companyDetail'],resolve)
      	},
      	{
      		path:'/imgcase',
          name: 'imgcase',
          component: resolve => require(['@/components/imgcase'],resolve)
      	},
      	{
      		path:'/imgcaseDetail',
          name: 'imgcaseDetail',
          component: resolve => require(['@/components/imgcaseDetail'],resolve)
      	},
      	{
      		path: '/login',
      		name: 'login',
      		component: resolve => require(['@/components/login'],resolve)
    		},
    		{
      		path: '/regist',
      		name: 'regist',
      		component: resolve => require(['@/components/regist'],resolve)
    		},
    		{
      		path: '/personalCenter',
      		name: 'personalCenter',
      		component: resolve => require(['@/components/personalCenter'],resolve)
    		}
      ]
    },
    {
      path: '/top/top',
      name: 'top',
      component: resolve => require(['@/components/top/top'],resolve)
    },
    {
      path: '/bottom/bottom',
      name: 'bottom',
      component: resolve => require(['@/components/bottom/bottom'],resolve)
    },
    {
      path: '/rules',
      name: 'rules',
      component: resolve => require(['@/components/rules'],resolve)
    }
  ]
})
